<div class="panel panel-default" ng-controller="RtVehicleListCtrl">
	<div class="panel-heading">
		城际约租 / 车辆档案<span style="color:red">（在票池中的车辆不可进行修改、删除操作。）</span>
	</div>
	<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
	<div class="row wrapper m-n">
		<form class="bs-example form-horizontal ng-pristine ng-valid">
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.model" class="form-control" placeholder="车辆型号">
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.number" class="form-control" placeholder="车牌号">
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<div class="input-group">
						<ui-select ng-model="orglist.selected" theme="bootstrap">
							<ui-select-match placeholder="所属单位">{{$select.selected.name}}</ui-select-match>
							<ui-select-choices repeat="org in orglist | propsFilter: {name: $select.search}">
								<span ng-bind-html=" org.name| highlight: $select.search"></span>
							</ui-select-choices>
						</ui-select>
						<span class="input-group-btn">
							<button ng-click="orglist.selected = undefined"	class="btn btn-default">
								<span class="glyphicon glyphicon-trash"></span>
						</button>
						</span>
					</div>
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<button type="button" class="btn btn-info" ng-click="query()">查询</button>
				</div>
			</div>
		</form>
	</div>
	<div class="table-responsive">
		<table class="table table-striped b-t b-light">
			<thead>
				<tr>
					<th style="width:10px;"></th>
					<th style="width:70px;">车辆编号</th>
					<th style="width:70px;">车辆型号</th>
					<th style="width:70px;">车牌号</th>
					<th style="width:70px;">座位数</th>
					<th style="width:110px;">所属单位</th>
					<th style="width:80px;">
						<a href tooltip="添加档案" has-authority="RENT_VEHICLE_ADD">
							<i class="fa fa-plus fa-fw" ng-click="write('lg',null,'insert')"></i>
						</a>
					</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="vehicle in dataList">
					<td></td>
					<td>{{vehicle.code}}</td>
					<td>{{vehicle.model}}</td>
					<td>{{vehicle.number}}</td>
					<td>{{vehicle.seats}}</td>
					<td>{{vehicle.org.name}}</td>
					<td>
						<div class="row list-icon">
							<a href tooltip="修改档案" ng-if="!vehicle.attached" has-authority="RENT_VEHICLE_UPDATE">
								<i class="fa fa-pencil fa-fw m-r-xs" ng-click="write('lg',vehicle,'update')"></i>
							</a>
							<a href tooltip="删除档案" ng-if="!vehicle.attached" has-authority="RENT_VEHICLE_DEL">
								<i class="fa fa-times fa-fw" ng-click="del('sm',vehicle ,'delete')"></i>
							</a>
							<a href tooltip="查看详情" ui-sref="app.rent.vehicleDetail({vehicleId: vehicle.id})" target="_blank">
								<i class="icon-info"></i>
							</a>
						</div>
					</td>
				</tr>
				<tr ng-show="dataList.length==0">
					<td colspan="9" style="text-align: center;">暂无车辆档案信息</td>
				</tr>
			</tbody>
		</table>
	</div>
	<page-footer/>
</div>